@extends('layouts.admin')
@section('css')

@stop
@section('content')
    <div class="col-sm-9 col-sm-offset-3 col-md-10 col-lg-10 col-md-offset-2 main" id="main">
        <h1 class="page-header">修改栏目</h1>
        <form action="{{url("admin/category/store")}}" method="post">
            {{csrf_field()}}
            <div class="form-group" style="display: none;">
                <label for="category-name">分类id</label>
                <input type="text" name="id" value="{{$category->id}}" class="form-control" placeholder="在此处输入分类名称" autocomplete="off">
                <span class="prompt-text">id</span> </div>
            <div class="form-group">
                <label for="category-name">分类名称</label>
                <input type="text" name="name" value="{{$category->name}}" class="form-control" placeholder="在此处输入分类名称" autocomplete="off">
                <span class="prompt-text">这将是它在站点上显示的名字。</span> </div>
            <div class="form-group">
                <label for="category-alias">关键词</label>
                <input type="text" name="keywords" value="{{$category->keywords}}" class="form-control" placeholder="在此处输入分类别名" autocomplete="off">
                <span class="prompt-text">分类的关键词信息</span> </div>
            <div class="form-group">
                <label for="category-alias">排序值</label>
                <input type="number" name="sort" value="{{$category->sort}}" class="form-control" placeholder="在此处输入排序值" autocomplete="off">
                <span class="prompt-text">排序越大越靠前</span> </div>
            <div class="form-group">
                <label for="category-fname">父级分类</label>
                <select id="category-fname" class="form-control" name="pid">
                    <option value="0" selected>无</option>
                    @foreach($cats as $v)
                        <option value="{{$v->id}}" @if($v->id==$category->id)selected="selected"@endif>{{$v->name}}</option>
                    @endforeach
                </select>
                <span class="prompt-text">分类是有层级关系的，您可以有一个“音乐”分类目录，在这个目录下可以有叫做“流行”和“古典”的子目录。</span> </div>
            {{--<div class="form-group">--}}
            {{--<label for="category-keywords">关键字</label>--}}
            {{--<input type="text" id="category-keywords" name="keywords" class="form-control" placeholder="在此处输入分类关键字" autocomplete="off">--}}
            {{--<span class="prompt-text">关键字会出现在网页的keywords属性中。</span> </div>--}}
            <div class="form-group">
                <label for="category-describe">描述</label>
                <textarea class="form-control" name="description" rows="4" autocomplete="off">{{$category->description}}</textarea>
                <span class="prompt-text">描述会出现在网页的description属性中。</span> </div>
            <button class="btn btn-primary" type="submit">确认修改</button>
        </form>
    </div>
@stop